// CRC32: 018CC40D | Matched 2 variants of 1 shaders: Standard (Specular setup)
// 
//    Unity headers extracted from StandardSpecular.shader
//    Shader "Standard (Specular setup)" {
//      Properties {
//       _Color ("Color", Color) = (1,1,1,1)
//       _MainTex ("Albedo", 2D) = "white" { }
//       _Cutoff ("Alpha Cutoff", Range(0,1)) = 0.5
//       _Glossiness ("Smoothness", Range(0,1)) = 0.5
//       _SpecColor ("Specular", Color) = (0.2,0.2,0.2,1)
//       _SpecGlossMap ("Specular", 2D) = "white" { }
//       _BumpScale ("Scale", Float) = 1
//       _BumpMap ("Normal Map", 2D) = "bump" { }
//       _Parallax ("Height Scale", Range(0.005,0.08)) = 0.02
//       _ParallaxMap ("Height Map", 2D) = "black" { }
//       _OcclusionStrength ("Strength", Range(0,1)) = 1
//       _OcclusionMap ("Occlusion", 2D) = "white" { }
//       _EmissionColor ("Color", Color) = (0,0,0,1)
//       _EmissionMap ("Emission", 2D) = "white" { }
//       _DetailMask ("Detail Mask", 2D) = "white" { }
//       _DetailAlbedoMap ("Detail Albedo x2", 2D) = "grey" { }
//       _DetailNormalMapScale ("Scale", Float) = 1
//       _DetailNormalMap ("Normal Map", 2D) = "bump" { }
//      [Enum(UV0,0,UV1,1)]  _UVSec ("UV Set for secondary textures", Float) = 0
//      [HideInInspector]  _Mode ("__mode", Float) = 0
//      [HideInInspector]  _SrcBlend ("__src", Float) = 1
//      [HideInInspector]  _DstBlend ("__dst", Float) = 0
//      [HideInInspector]  _ZWrite ("__zw", Float) = 1
//      }
//      Fallback "VertexLit"
//      SubShader 1/2 {
//        LOD 300
//        Tags { "RenderType"="Opaque" "PerformanceChecks"="False" }
//        Pass 1/5 {
//          Name "FORWARD"
//          Tags { "LIGHTMODE"="ForwardBase" "SHADOWSUPPORT"="true" "RenderType"="Opaque" "PerformanceChecks"="False" }
//          ZWrite [_ZWrite]
//          Blend [_SrcBlend] [_DstBlend]
//          GpuProgramID 36701
//          Program "vp" {
//            SubProgram "d3d9 " {
// 2:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_OFF" "VERTEXLIGHT_ON" "_EMISSION" }
// 1:           Keywords { "DIRECTIONAL" "DIRLIGHTMAP_OFF" "DYNAMICLIGHTMAP_OFF" "FOG_LINEAR" "LIGHTMAP_OFF" "SHADOWS_OFF" "VERTEXLIGHT_ON" }
//              Bind "vertex" Vertex
//              Bind "normal" Normal
//              Bind "texcoord" TexCoord0
//              Bind "texcoord1" TexCoord1
//              Matrix 8 [_Object2World] 3
//              Matrix 11 [_World2Object] 3
//              Matrix 4 [glstate_matrix_mvp]
//              Vector 24 [_DetailAlbedoMap_ST]
//              Vector 23 [_MainTex_ST]
//              Float 25 [_UVSec]
//              Vector 14 [_WorldSpaceCameraPos]
//              Vector 18 [unity_4LightAtten0]
//              Vector 15 [unity_4LightPosX0]
//              Vector 16 [unity_4LightPosY0]
//              Vector 17 [unity_4LightPosZ0]
//              Vector 0 [unity_LightColor0]
//              Vector 1 [unity_LightColor1]
//              Vector 2 [unity_LightColor2]
//              Vector 3 [unity_LightColor3]
//              Vector 21 [unity_SHBb]
//              Vector 20 [unity_SHBg]
//              Vector 19 [unity_SHBr]
//              Vector 22 [unity_SHC]
//            }
//          }
//        }
//      }
//    }
// 
// Headers extracted with DarkStarSword's extract_unity_shaders.py
// https://raw.githubusercontent.com/DarkStarSword/3d-fixes/master/extract_unity_shaders.py

    vs_3_0
    def c26, 0, 1, 0, 0
    dcl_position v0
    dcl_normal v1
    dcl_texcoord v2
    dcl_texcoord1 v3
    dcl_position o0
    dcl_texcoord o1
    dcl_texcoord1 o2.xyz
    dcl_texcoord2 o3
    dcl_texcoord3 o4
    dcl_texcoord4 o5
    dcl_texcoord5 o6
    dcl_texcoord7 o7.x
    dcl_texcoord8 o8.xyz

def c220, 0, 1, 0.0625, 0.5
dcl_2d s0

texldl r31, c220.z, s0

// Unity reflection/specular fix inserted with DarkStarSword's shadertool.py:
// shadertool.py -I ../.. --fix-unity-reflection --auto-fix-vertex-halo --add-fog-on-sm3-update --only-autofixed --ignore-register-errors Standard (Specular setup)/vp/018CC40D.txt
mov r30, c14
mov r29, c220.x
mul r29.x, r31.x, -r31.y
dp4 r28.x, c180, r29
dp4 r28.y, c181, r29
dp4 r28.z, c182, r29
dp4 r28.w, c183, r29
dp4 r29.x, c190, r28
dp4 r29.y, c191, r28
dp4 r29.z, c192, r28
add r30.xyz, r30, -r29

    dp4 o0.x, c4, v0
    dp4 o0.y, c5, v0
    dp4 o0.w, c7, v0
    mad o1.xy, v2, c23, c23.zwzw
    abs r0.x, c25.x
    sge r0.x, -r0.x, r0.x
    mov r1.xy, v2
    lrp r2.xy, r0.x, r1, v3
    mad o1.zw, r2.xyxy, c24.xyxy, c24
    dp4 r0.x, c8, v0
    dp4 r0.y, c9, v0
    dp4 r0.z, c10, v0
    add o2.xyz, r0, -r30
    add r1, -r0.z, c17
    mov o8.xyz, r0
    add r2, -r0.x, c15
    add r0, -r0.y, c16
    mul r3.xyz, c12, v1.y
    mad r3.xyz, c11, v1.x, r3
    mad r3.xyz, c13, v1.z, r3
    nrm r4.xyz, r3
    mul r3, r0, r4.y
    mul r0, r0, r0
    mad r0, r2, r2, r0
    mad r2, r2, r4.x, r3
    mad r2, r1, r4.z, r2
    mad r0, r1, r1, r0
    rsq r1.x, r0.x
    rsq r1.y, r0.y
    rsq r1.z, r0.z
    rsq r1.w, r0.w
    mov r3.y, c26.y
    mad r0, r0, c18, r3.y
    mul r1, r1, r2
    max r1, r1, c26.x
    rcp r2.x, r0.x
    rcp r2.y, r0.y
    rcp r2.z, r0.z
    rcp r2.w, r0.w
    mul r0, r1, r2
    mul r1.xyz, r0.y, c1
    mad r1.xyz, c0, r0.x, r1
    mad r0.xyz, c2, r0.z, r1
    mad r0.xyz, c3, r0.w, r0
    mul r0.w, r4.y, r4.y
    mad r0.w, r4.x, r4.x, -r0.w
    mul r1, r4.yzzx, r4.xyzz
    mov o5.xyz, r4
    dp4 r2.x, c19, r1
    dp4 r2.y, c20, r1
    dp4 r2.z, c21, r1
    mad r1.xyz, c22, r0.w, r2
    add o6.xyz, r0, r1
    dp4 r0.x, c6, v0
    mov o0.z, r0.x
    mov o7.x, r0.x
    mov o3, c26.x
    mov o4, c26.x
    mov o5.w, c26.x
    mov o6.w, c26.x
